//
// Created by jianchuanli on 17-3-7.
//

#ifndef DUER_LINUX_DEVICE_H
#define DUER_LINUX_DEVICE_H

#include "BDuerConstant.h"
#include <pthread.h>

namespace bduer {
    class Device {
    public:
        Device(char *name);

        Device();

        virtual void insert_status(struct DeviceStatus device_status) = 0;

        virtual void get_status(const char *&status, int &len) = 0;

        virtual void parse_event(struct DeviceEvent device_event, char *&event, int &len) = 0;

        virtual char *get_name();

    protected:
        pthread_mutex_t mutex;
    private:
        char *name;
    };
}
#endif //DUER_LINUX_DEVICE_H
